feat: support automatic per-cell execution history filtering and isolated callbacks#17144
Open
shuoweil wants to merge 21 commits into
Open
feat: support automatic per-cell execution history filtering and isolated callbacks#17144shuoweil wants to merge 21 commits into
shuoweil wants to merge 21 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a callback parameter to the _read_gbq_colab function, allowing users to receive query execution events. The changes include updates to the public API, the session implementation, and the addition of a unit test to verify the callback functionality. A review comment suggests refactoring the _read_gbq_colab method to eliminate code duplication in the query execution logic by using a local helper function.
96d6693 to
d3bf48c
Compare
22ff695 to
b9c9336
Compare
ec7a56a to
5f9d824
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change introduces scoped query tracking and event callback management for BigQuery DataFrames within interactive notebook environments (Jupyter/Colab).
Key Changes
Jupyter Cell Scoping: Resolves and carries the active IPython cell execution count (cell_execution_count) through TableWidget, ExecutionSpec, query executors, and final JobMetadata.
Execution History Filtering: Adds events, job_ids, and all_cells parameters to session.execution_history(). When all_cells=False, it filters query logs down to the current active notebook cell.
Scoped Callback Support: Adds a callback parameter to _read_gbq_colab that automatically subscribes to the query progress publisher during execution and automatically unsubscribes upon completion.
Robustness Fixes:
Verified at:
https://screencast.googleplex.com/cast/NjQzOTAzMTUwMzA2MDk5MnwzZWQ2MTMzYS0xYg
Colab notebook test: screen/7d6Yt3C28BUAKEH
Fixes #<513337964> 🦕